package com.isxcode.link.common.pojo;

import com.isxcode.link.common.exception.LinkExceptionEnum;
import com.isxcode.link.common.pojo.dto.LinkData;
import lombok.Builder;
import lombok.Data;

/**
 * star 请求返回体
 */
@Data
@Builder
public class LinkResponse {

    private String code;

    private String message;

    private LinkData linkData;

    public LinkResponse() {
    }

    public LinkResponse(String code, String message, LinkData linkData) {
        this.code = code;
        this.message = message;
        this.linkData = linkData;
    }

    public LinkResponse(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public LinkResponse(LinkExceptionEnum linkExceptionEnum) {

        this.code = linkExceptionEnum.getCode();
        this.message = linkExceptionEnum.getMessage();
    }
}
